import numpy as np

arr1d = np.array([1, 2, 3])
arr1d
arr2d = np.array([[1, 2, 3], [4, 5, 6]])
arr2d
print(arr1d)
print(arr2d)

print(np.zeros((3, 3)))
print(np.ones((3, 3)))
print(np.arange(1, 20, 5))
print(np.linspace(1, 20, 5))
print(np.array([1, 2, 3], dtype = np.float32))

data = np.array([[1,2,3],[4,5,6]])
float_data =data.astype(np.float32)
float_data .dtype.name
print(float_data.dtype.name)

float_data=np.array([1.2,2.9,3.5])
int_data=float_data.astype(np.int32)
int_data
print(int_data)

str_data=np.array(['1','2','3'])
int_data=str_data.astype(np.int64)
int_data
print(int_data)